---
output:
  pdf_document: default
  html_document: default
---
# Overview
This codebook describes the variables in the `pres_out.rds` dataset, the primary one used in analysis.

# Codebook

| Variable Name | Description |
|---------------|-------------|
| county        | County      |
| year          | Election year |
| state         | State |
| fips          | 5-digit FIPS code |
| adjgroup      | Degree of adjacency to a county with coal employment |
| break_year    | Year of state-specific shale shock |
| TotalVotes    | Total votes |
| RepVotes      | Total votes for the Republican |
| DemVotes      | Total votes for the Democrat |
| pop           | County population in 2000 |
| white         | Share of white residents in 2000 |
| black         | Share of Black residents in 2000 |
| poverty       | Share of residents below the poverty line in 2000 |
| income99pc    | Per capita income in 1999 |
| hispanic      | Share of Hispanic residents in 2000 |
| work_female   | Share of females in the labor force in 2000 |
| foreign       | Share of foreign-born residents in 2000 |
| rural_nonfarm | Share of rural non-farm residents in 2000 |
| emp_all       | County employment |
| coal          | Number employed in coal |
| power         | Number employed in fossil fuel electricity generation |
| oilgas        | Number employed in oil and gas extraction |
| unionshare    | Share of unionized coal miners |
| debt06        | Household debt-to-income ratio in 2006 |
| NewGas        | Indicates a new gas power plant |
| NewGasDistance  | County distance to a new gas power plant |
| gas_r         | Real natural gas prices |
| coal_r        | Real coal prices |
| coalgas_ratio_z | Standardized ratio of coal-to-gas prices |
| RepVotesMajorPercent | Two-party Republican vote share |
| poplog        | County population in 2000 logged |
| income99pclog | Per capita income in 1999 logged | 
| under40       | Share of county under 40 years in 2000 |
| college       | Share of county with a college education in 2000 |
| pop_s         | County population standardized relative to state average in 2000 |
| white_s       | Share of white residents standardized relative to state average in 2000 | 
| black_s       | Share of Black residents standardized relative to state average in 2000 |
| poverty_s     | Share under the poverty level standardized relative to state average in 2000 |
| income99pc_s  | Per capita income in 1999 standardized relative to the state average in 2000 |
| hispanic_s    | Share of Hispanic residents standardized relative to the state average in 2000 |
| work_female_s | Female workforce share relative to state average in 2000 |
| foreign_s     | Share of foreign-born residents relative to the state average in 2000 |
| rural_nonfarm_s | Share of rural non-farm residents relative to the state average in 2000 |
| poplog_s      | County population (logged) standardized relative to the state average in 2000 |
| income99pclog_s | Per capita income in 1999 (logged) standardized relative to the state average in 2000 |
| under40_s     | Share of population under 40 years relative to the state average in 2000 |
| college_s     | Share of population with a college education relative to the state average in 2000 | oilgas_prop   | Share of workers in oil and gas extraction |
| coal_prop     | Share of workers in coal mining |
| power_prop    | Share of workers in fossil fuel electricity generation |
| coal_prop_00  | Share of workers in coal mining in 2000 |
| coal_prop_00_c | Share of workers in coal mining standardized relative to national county-level average in 2000 |
| coal_prop_00_s | Share of workers in coal mining standardized relative to state average in 2000 |
| coal_prop_pre | Pre-shock share of coal employment |
| coal_prop_pre_c | Pre-shock share of coal employment standardized relative to national county-level average | 
| coal_prop_pre_s | Pre-shock share of coal employment standardized relative to state average |
| coal_chg        | Change in coal mining employment |
| coallayoff      | Indicates a decline of coal employment between election years |
| coallayoff_treat | Treatment indicator for if a county experienced a decline in coal employment |
| county_state    | Combines county and state names |
| NewGasDistance_s | Distance to a new gas power plant standardized relative to the state average |
| NewGasDistance_c | Distance to a new gas power plant standardized relative to the county's average |
| treat           | Indicates treatment group membership |
| coal_dd         | Indicates treatment group membership |
| coal_bin        | Indicates treatment group membership |
| post_shock      | Indicates post-shale shock period |
| treated         | Indicates treatment group membership during post-shock period |
| emptreat        | Indicates if in the treatment group for the employment loss condition |
| treated_var     | Indicates treatment group membership during state-specific post-shock period |
| sample          | Label for mapping counties |
| layoff          | Indicates if a county experienced a large number of layoffs in any industry |
| emp_chg         | Change in employment between elections |
| ant_treat_emp   | Indicates if a county has an anthracite mine |
| iron_falsify    | Indicates if a county has an iron mine |
| silver_falsify  | Indicates if a county has a silver mine |
| sandstone_falsify | Indicates if a county has a sandstone mine |
| coal_nat        | National coal employment |
| empall          | National number of workers |
| nat_coal_prop   | National share of coal employment  
| nat_coal_z      | Standardized national share of coal employment | 
| funds_arc       | ARC POWER grant funding |
| funds_total     | Total ARC grant funding |
| grants          | Count of grants |
| funds_arc_cum   | Cumulative ARC POWER grant funding |
| funds_total_cum | Cumulative ARC grant funding |
| grants_cum      | Cumulative count of grants |
